package com.xishu.entity.shop;

import com.xishu.annotation.dao.Search;
import com.xishu.annotation.lang.Lang;
import com.xishu.annotation.oplog.OplogAnnotation;
import com.xishu.entity.AbstractEntity;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 菜品与品类的映射
 */
@Entity(name = "catalog_item_mapping")
@Table(indexes = {@Index(columnList = "itemId"), @Index(columnList = "catalogId")})
public class CatalogItemMapping extends AbstractEntity {
    private static final long serialVersionUID = -2770228012801040787L;

    @ApiModelProperty(value = "菜品ID")
    private Long itemId;

    @ApiModelProperty(value = "菜品名称")
    @Lang(key = "itemName")
    private String itemName;

    @ApiModelProperty(name = "菜品的名称")
    @OplogAnnotation(fieldName = "菜品的名称")
    @Lang(key = "itemName")
    private String itemName_zh;

    @ApiModelProperty(name = "菜品的名称")
    @OplogAnnotation(fieldName = "菜品的名称")
    @Lang(key = "itemName")
    private String itemName_en;

    @ApiModelProperty(value = "图片ID")
    private String imgId;

    @ApiModelProperty(value = "品类ID")
    private Long catalogId;

    @ApiModelProperty(value = "品类名称")
    @Lang(key = "catalogName")
    private String catalogName;

    @ApiModelProperty(value = "品类名称")
    @Lang(key = "catalogName")
    private String catalogName_zh;

    @ApiModelProperty(value = "品类名称")
    @Lang(key = "catalogName")
    private String catalogName_en;

    @ApiModelProperty(value = "上线")
    private Boolean online;

    @ApiModelProperty(value = "是否已售完")
    private Boolean saleOut;

    @ApiModelProperty(value = "分店ID")
    private Long shopId;

    @Transient
    @ApiModelProperty(value = "是否是套餐")
    private Boolean setMenu;

    @Transient
    @ApiModelProperty(value = "是否是推荐菜")
    private Boolean suggestion;

    @ApiModelProperty(value = "是否要查询菜品")
    private Boolean queryItem;

    @ApiModelProperty(value = "菜品余量")
    private Integer leftCount;

    @ApiModelProperty(value = "菜品余量显示数据")
    @Transient
    private String leftCountShow;

    @Transient
    private Item item;

    @ApiModelProperty(value = "实时过滤场景")
    @Transient
    @Search(ignore = true)
    private Long filterSceneId;

    public Long getFilterSceneId() {
        return filterSceneId;
    }

    public void setFilterSceneId(Long filterSceneId) {
        this.filterSceneId = filterSceneId;
    }

    public Integer getLeftCount() {
        return leftCount;
    }

    public void setLeftCount(Integer leftCount) {
        this.leftCount = leftCount;
    }

    public Item getItem() {
        return item;
    }

    public void setItem(Item item) {
        this.item = item;
    }

    public Boolean getSuggestion() {
        return suggestion;
    }

    public void setSuggestion(Boolean suggestion) {
        this.suggestion = suggestion;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Boolean getSetMenu() {
        return setMenu;
    }

    public void setSetMenu(Boolean setMenu) {
        this.setMenu = setMenu;
    }

    public Boolean getOnline() {
        return online;
    }

    public void setOnline(Boolean online) {
        this.online = online;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getImgId() {
        return imgId;
    }

    public void setImgId(String imgId) {
        this.imgId = imgId;
    }

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    public Long getCatalogId() {
        return catalogId;
    }

    public void setCatalogId(Long catalogId) {
        this.catalogId = catalogId;
    }

    public Boolean getSaleOut() {
        return saleOut;
    }

    public void setSaleOut(Boolean saleOut) {
        this.saleOut = saleOut;
    }

    public Boolean getQueryItem() {
        return queryItem;
    }

    public void setQueryItem(Boolean queryItem) {
        this.queryItem = queryItem;
    }

    public String getCatalogName() {
        return catalogName;
    }

    public void setCatalogName(String catalogName) {
        this.catalogName = catalogName;
    }

    public String getItemName_zh() {
        return itemName_zh;
    }

    public void setItemName_zh(String itemName_zh) {
        this.itemName_zh = itemName_zh;
    }

    public String getItemName_en() {
        return itemName_en;
    }

    public void setItemName_en(String itemName_en) {
        this.itemName_en = itemName_en;
    }

    public String getCatalogName_zh() {
        return catalogName_zh;
    }

    public void setCatalogName_zh(String catalogName_zh) {
        this.catalogName_zh = catalogName_zh;
    }

    public String getCatalogName_en() {
        return catalogName_en;
    }

    public void setCatalogName_en(String catalogName_en) {
        this.catalogName_en = catalogName_en;
    }

    public String getLeftCountShow() {
        return leftCountShow;
    }

    public void setLeftCountShow(String leftCountShow) {
        this.leftCountShow = leftCountShow;
    }
}
